<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Title</title>
    <style>
        h1, h2, h3, h4, h5, h6 {
            font-size: 100%;
            font-weight: 400;
        }

        a, div {
            -webkit-tap-highlight-color: transparent;
        }

        h3 {
            display: block;
            font-size: 1.17em;
            -webkit-margin-before: 1em;
            -webkit-margin-after: 1em;
            -webkit-margin-start: 0px;
            -webkit-margin-end: 0px;
            font-weight: bold;
        }

        .mobile-simulator {
            width: 323px;
            height: 675px;
            background: url(../img/mobile-simulator.png) no-repeat center center;
            margin: 15px auto;
            position: relative;
        }

        .app-container {
            width: 823px;
            background: rgba(255, 255, 255, .22);
            position: relative;
            margin: 0 auto;
        }

        body {
            background: url(../img/bg_9f0d01d.jpg) no-repeat center center;
            background-size: cover;
            margin: 0;
            padding: 0;
        }

        .display-area {
            height: 760px;
            overflow: hidden;
            position: relative;
        }

        .title {
            position: absolute;
            left: 50%;
            top: 59px;
            width: 180px;
            margin-left: -90px;
            color: #fff;
            text-align: center;
        }

        .ellipse {
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }

        iframe {
            position: absolute;
            top: 116px;
            left: 1px;
            border: 0;
            background: #fff;
            width: 320px;
            height: 504px;
        }

        html {
            color: #000;
            background: #FFF;
            font-size: 16px;
        }
    </style>
</head>
<body>
<div class="main-container">
    <div class="app-container">
        <div class="display-area">
            <div class="mobile-simulator">
                <h3 class="title ellipse">兔展兔大师—更专业的场景营销众包平台</h3>
                <iframe id="app-iframe" src="http://v6.rabbitpre.com/m/jNQYn7uUu?mobile=1" class="iframe"></iframe>
            </div>
        </div>
    </div>

</div>

</body>
<script>
    var url = getUrlParam('url')
    var titles = getUrlParam('title')

    console.log(url)
    var iframeUrl = document.querySelector('#app-iframe');
    var title = document.querySelector('.ellipse');
    title.innerHTML = titles;
    console.log(iframeUrl)
    iframeUrl.src = url;
    console.log(iframeUrl.src)

    function getUrlParam(name) {
        // param=123&param1=456
        var queryString = window.location.search.split('?')[1] || '',
            reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"),
            result = queryString.match(reg);
        return result ? decodeURIComponent(result[2]) : null;
    }
</script>

</html>
